home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
pxlgt100.zip
/
LOGTIME.DOC
< prev
next >
Wrap
Text File
|
1993-12-05
|
4KB
|
135 lines
LogTime Version 1.00 (c) Copyright 1994, Michael Gallias
This program logs the current time into a file. It stores the last
170 times in a specified file. This is useful for your AUTOEXEC.BAT
because you can track when last someone used your computer. If it
boots up with the time it was last used, you can know if someone
used your computer while you were away.
Although it is possible for someone to turn on the computer without
being detected, the average user will have the time logged before he
can do anything about it. Only if a person knows the program is in
your AUTOEXEC.BAT and they know how to get around it can they boot
your PC without you knowing.
It's simple to install, just add the line
LOGTIME
to your AUTOEXEC.BAT. It is NOT a TSR - it uses no memory once it
has logged the time. By default, it uses the file C:\TEMP\BOOTLOG.
It logs the time when run and displays the last time it was called.
The first time you run it, it will ask you whether you want to
create the time file. Do so and it will create an empty file to
store the times in.
Options
-------
(For these command line options you may use the - or the /
character.)
/f=<file>
Allows you to use a different file. You can thus place LOGTIME
in all your batch files (if you really wanted to) to log the
time each program is used. Each file uses 2k of disk space.
Note that no space may be before or after the = sign.
/L
List all recorded times in the file. The current time is not logged
if you use this option, unless you add /s+ after the /L.
/s-
Do not log time.
/s+
Do log the time (default, unless /L is used).
/d-
Do not display last logged time.
/d+
Do display last logged time (default, unless /L is used).
/1=<message>
The message to use before the date and time are displayed. No spaces
are allowed but the underscore (_) is converted to a space.
/2=<message>
The message to use after the date and time are displayed. No spaces
are allowed but the underscore (_) is converted to a space.
Examples
--------
LOGTIME -L
Lists all past times logged.
LOGTIME -f=C:\BOOTLOG /1=Computer_last_booted_on_ /2=.__Hello,_Commander.
Displays the last logged time and stores the current time in the
file C:\BOOTLOG. The display will be something like
Computer last booted on 01/01/94 13:22:01. Hello, Commander.
LOGTIME -f=C:\OUTLOG /d-
Logs the current time but does not display the last time stored in
the file C:\OUTLOG.
This batch file flushes the SmartDrv buffer and records the time.
This is ideal to run just before you turn off the computer.
---------------------------------------------------
@echo off
echo.
echo WAIT . . .
echo A
smartdrv /c
LOGTIME -1=Last_logout_was_on_ -2=.__You_have_been_logged_out. -f=C:\TEMP\OUTLOG
echo.
---------------------------------------------------
Why do I log 170 times?
Because most hard drives use a minimum of 2kb per file. So a 1 byte
file uses 2kb, and a 2kb file uses 2kb. 170 times come to just less
than 2 kb.
You may modify the source code for your own use, but you may not
distribute the modified code. If you distribute this program, please
distribute the .EXE file and the .PAS file with all the .DOC files
together, all unmodified. You may use this program freely, but a
postcard would be appreciated. See DETAILS.DOC for my address.
If you really want to, you can send me a small donation. If you
like the program, I just want a postcard. As this is free software
I take no responsibilty for any losses or damages caused by it.
Please EMail me or write to me with comments, suggestions or bug
reports.
To compile the source code, you will need the following source code
units, also written by me (also postware):
PSSTR Pascal Strings
PSCMD Pascal Command Line Control
They should be available at the same BBS or FTP site that you
collected this file from.
Ciao
Michael